﻿
CREATE PROCEDURE InsertCargo( 
		@CargoName nvarchar(100),
        @Description nvarchar(250),
        @Code nchar(5),
        @CodeETSNG nchar(6),
        @CargoETSNGName nvarchar(250),
        @CodeGNG nchar(8),
        @CodeGNGName nvarchar(250),
        @Mnemocode nvarchar(12) )
AS
BEGIN
	INSERT INTO Cargo (Name,[Description],ShortCode,Code,CodeGNG,Mnemocode)
	VALUES (@CargoName,@Description,@Code,@CodeETSNG,@CodeGNG,@Mnemocode)

	INSERT INTO CargoETSNG (CargoETSNG_ID,Name,CargoGNG_ID)
	VALUES (@CodeETSNG,@CargoETSNGName,@CodeGNG)

	INSERT INTO CargoGNG (CargoGNG_ID,Name)
	VALUES (@CodeGNG,@CodeGNGName)
END